<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>列表页</title>
    <link rel="stylesheet" href="/public/css/bootstrap.min.css">
    <link rel="stylesheet" href="/public/css/animate.min.css">
    <link rel="stylesheet" href="/public/css/jquery.gDialog.css">
</head>
<body>
<!-- header start -->
<div class="jumbotron">
    <div class="container">
        <h1>CURD 练习</h1>
        <h2>——玩转表单</h2>
    </div>
</div>
<!-- header end -->

<!-- content start -->
<div class="container content">
    <div class="row">
        <div class="sidebar col-md-3">
            <div class="list-group">
                <a href="/app/Home/View/Index/detail.html" class="list-group-item ">
                    学生列表
                </a>
                <a href="/app/Home/View/Index/form.html" class="list-group-item active">
                    新增学生
                </a>
            </div>
        </div>

        <div class="main col-md-9">

            <div class="alert alert-warning" role="alert">
                <button type="button" class="close" data-dismiss="alert">
                    <span aria-hidden="true">&times;</span>
                    <span class="sr-only">Close</span>
                </button>
                <ul>
                    <li><p>姓名为必填项</p></li>
                    <li><p>年龄必须为整数</p></li>
                </ul>
            </div>

            <div class="panel panel-default">
                <!-- Default panel contents -->
                <div class="panel-heading">新增学生</div>

                <br>

       <form class="form-horizontal" role="form" action="{:U('Home/Index/doupdate')}" method="post">
                    <div class="form-group">
                        <label for="inputName" class="col-sm-2 control-label">姓名</label>
                        <div class="col-sm-5">
   <input type="hidden" value="{$res['id']}" name="id">
    <input type="text" class="form-control" id="inputName" placeholder="Name" name="name" value="{$res['name']}" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="inputAge" class="col-sm-2 control-label">年龄</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="inputAge" placeholder="Age" name="age" value="{$res['age']}">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="inputClass" class="col-sm-2 control-label">班级</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="inputClass" placeholder="Class" name="class" value="{$res['class']}">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">性别</label>
                        <div class="col-sm-5">
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="sex" id="optionsRadios2" value="女">女
                                </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="sex" id="optionsRadios2" value="男">男
                                </label>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-default">提交</button>
                        </div>
                    </div>
                </form>

            </div>

        </div>
    </div>
</div>
<!-- content end -->

<!--footer start-->
<div class="jumbotron" style="margin-bottom: 0px;">
    <div class="container">
        <h5>&copy;2016-12-12 by dp</h5>
    </div>
</div>
<!--footer end-->

<!-- script start -->
<script src="./js/jquery-1.8.3.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/highlight.min.js"></script>
<script src="./js/jquery.gDialog.min.js"></script>
<script src="./js/holder.min.js"></script>
<!-- script end -->
</body>
</html>